/*
@authors - Siddharth Sathyam, Pat LaMontagna, Alan Ruvalcaba
@Description - Chat Window GUI Code
**/

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QDebug>
#include <QErrorMessage>
#include <QTcpSocket>
#include <QHostAddress>
#include <im_window.h>

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
	Q_OBJECT

    public:
	explicit MainWindow(QWidget *parent = 0);
	~MainWindow();

    private slots:
	void on_usernameEdit_textEdited(const QString &arg1);
	void on_loginButton_clicked();
	void on_aboutButton_clicked();
	void sendUserInfo();
	void readyRead();

    private:
	void showChatWindow();

	QString username;

	// Create the main UI window
	Ui::MainWindow *ui;

	QTcpSocket *socket;

	// Create a new window (chatWindow)
	im_window *chatWindow;

	QErrorMessage *errorMessageDialog;

};

#endif // MAINWINDOW_H
